package com.yykj.hospital.server.model.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yykj.common.util.serializer.LocalDate2LongSerializer;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.time.LocalDateTime;

@Data
@Entity
public class HospitalDoctorBindLabel {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private Integer hospitalId;

    private String doctorId;

    private String doctorName;

    private String depName;

    private String labelIds;

    private String labelNames;

    @CreationTimestamp
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    private LocalDateTime addTime;

    @UpdateTimestamp
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    private LocalDateTime modifyTime;
}
